<h2 class="heading">Announcements</h2>
<div class="announcements">
<?php if( isset($isAdmin) && $isAdmin === true ) : ?>
	<a class="add" href="/org/view/<?php echo $currentOrg ?>/announcements/add">Add announcement</a>
<?php endif; ?>
<?php if( count($announcements) === 0 ): ?>
	No announcements yet.
<?php endif; ?>
<?php foreach( $announcements as $announcement ) :  ?> 
	<div class="announcement"> 

		<a class="view" href="/org/view/<?php echo $currentOrg ?>/announcements/show/<?php echo $announcement['article_id'] ?>">View</a>
		<h2 class="title"><?php echo $announcement['title'] ?></h2>
		<p class="date">Date posted: <?php echo date('M j Y h:i:sa', strtotime($announcement['date']) + 8*36000 ) ?></p>
		<hr/>
		<div class="post"><?php echo nl2br( $announcement['post'] ) ?></div>
	</div>
<?php endforeach;?> 
</div>
